A set of actions is generated at the compile time of a statement. The actions can be stored as opcodes, or processes to be performed at execution time of the statement. The opcodes are used by an execution engine to determine which processes to perform in order to retrieve values for the variables in the statement. After the values are retrieved, the statement is executed.
For example, most DML statements, and some queries (such as those with a WHERE clause), have a program to pass and receive data to the database server as part of a SQL or native language statements (PL/SQL). Such data can be constant or literal data, which is usually unknown when the program is compiled. This data is referred to as bind variables in a database server.
In a database application, most of the queries and DML statements usually contain multiple bind variables. The user input is read at runtime for input bind variables, and the output is sent back for output bind variables.
Reading and writing the bind data values for the bind variables (bind processing) can be very expensive because of the context under which the reading and writing are processed. A large part of the runtime for a query is due to re-determining metadata about this context, which was available but not captured, when the query was compiled. Bind processing can vary a lot depending on the metadata and user/language context. If this metadata is not captured at compile time, a lot of time needs to be spent at runtime to gather the relevant information in order to determine which actions to take when performing bind processing.